package com.jss.lanouhn.fristapp.adapters;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by lanouhn on 16/8/25.
 */
public class StrategryViewpagerAdapter extends FragmentPagerAdapter{
    private List<String> listName;
    private List<Fragment> listFragments;


    public StrategryViewpagerAdapter(FragmentManager fm, List<String> listName, List<Fragment> listFragments) {
        super(fm);
        this.listName = listName;
        this.listFragments = listFragments;
    }

    @Override
    public Fragment getItem(int position) {

        return listFragments.get(position);
    }

    @Override
    public int getCount() {

        return listFragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {

        return listName.get(position);
    }
}
